package top.infopub.mgr.mkt.web;


import com.github.pagehelper.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import top.infopub.mgr.common.page.ParamPage;
import top.infopub.mgr.common.vo.RspVo;
import top.infopub.mgr.flow.web.GenericFlowController;
import top.infopub.mgr.mkt.domain.BidManageDomain;
import top.infopub.mgr.mkt.domain.ProjectDomain;
import top.infopub.mgr.mkt.service.BidManageService;
import top.infopub.mgr.mkt.vo.BidManageVo;
import top.infopub.mgr.mkt.vo.MarketingVo;

/**
 * 投标管理
 */
@Controller
@RequestMapping("/bidManage")
public class BidManageController extends GenericFlowController {


    @Autowired
    private BidManageService bidManageService;
    @RequestMapping("/bidManageList")
    public String mktProList() {
        return "mkt/lay-bidManage-list";
    }

    @RequestMapping("/queryDataByCondition")
    @ResponseBody
    public RspVo<BidManageDomain> queryDataByCondition(BidManageVo bidManageVo,
                                                       ParamPage paramPage) {
        Page<BidManageDomain> page = new Page<BidManageDomain>();
        page.setPageNum(paramPage.getPage());
        page.setPageSize(paramPage.getLimit());
        page = bidManageService.selectPage(page, bidManageVo);
        return RspVo.getSuccessResponse(page.getTotal(), page.getResult());
    }
}
